package org.pageley.games.sanctuary.domain.environment.room;

import org.pageley.games.sanctuary.domain.Direction;
import org.pageley.games.sanctuary.domain.Location;

public class Corridor extends AbstractRoom {

	private int length;
	private Direction orientation;
	
	public Corridor(Location location, int length, Direction orientation) {
		super(location);
		this.length = length;
		this.orientation = orientation;
	}

	@Override
	public int getHeight() {
		int y = this.orientation.getY();
		return y != 0 ? this.length * y : 1;
	}

	@Override
	public int getWidth() {
		int x = this.orientation.getX();
		return x != 0 ? this.length * x : 1;
	}

}
